This is first time for me to build my own independent Blog. There is a lot of difficults, but finally, I did it! Let me give a brief summary to some points.
The most important thing I want to say is that:
Always Believe the Official Website rather than any individual introductions!*
看官网真的比看别人的教程清楚,不要因为它们是英文的就怕麻烦。因为有时候指令会更新(⊙o⊙)哦,但教程却没有及时更新,所以绕过来绕过去,就error了!
First:
1.Download node.js Official website:https://nodejs.org/en/
2.Download homebrew Official website:http://brew.sh/index_zh-cn.html
3.Download hexo Official website:https://hexo.io/zh-cn/docs/
Second:
1.creat a new repository on github
The Repository name must be accord with your github account name.
Just like this:
2.Download the respostory to local, rename it as “public”
把建好的仓库下载到本地来,重新命名为public。
3.open Terminal:
$ mkdir hexo
$ cd hexo
$ hexo init
$ npm install
$ hexo server
Now,enter http://0.0.0.0:4000 in Google you can see the localhost !
在浏览器输入 http://0.0.0.0:4000
就可以看到本地站点了!注:打开hexo文件夹,发现已经有一个public的文件夹(它是hexo用来generate 本地静态页面的),把之前本地仓库拖进来与它合并。方便以后git pull。
Third:
Creat your site on GitHubPages
Here is the detail introduction:
https://pages.github.com/
Just like this:
Now we got a domain name which is:username.github.io
现在你得到了一个username.github.io的域名!
Fourth:
- Connect localhost with site.
将本地的http://0.0.0.0:4000 这玩意
和username.github.io 挂钩起来。Detail introduction:https://hexo.io/zh-cn/docs/deployment.html
Finally:
Writing!
Remember after every times change,use the command:hexo d -g
给几个关于hexo模板修改的很棒的网页链接,后期我会参考用到。
icon